<?php
// +----------------------------------------------------------------------
// | OneThink [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------
namespace Admin\Controller;
/**
 * 后台相册控制器
 */
class AlbumController extends AdminController {
    public function showAlbum(){
        $uid  = I('get.id');
        $data = D('Album') ->showAll($uid);
        //过滤已经删除完的图片
        $data = D('Album') ->delNull($data);
        //把图片字符串转为数组
        $res  = D('Album') ->selectImg($data);
        $this ->assign('res',$res);
        $this ->display();
    }
    /**
     * [ajaxDel description]ajax删除数据
     * @return [type] [description]
     */
    public function ajaxDel(){
        $post = I('post.');
        $data = D('Album') ->ajaxDel($post);
        $this ->ajaxReturn($data);
    }
}